//
//  RegisterSingleTableViewCell.m
//  SafeFoodManagerDemo
//
//  Created by bob on 2017/10/18.
//  Copyright © 2017年 bob. All rights reserved.
//

#import "RegisterSingleTableViewCell.h"
#import "UILabel+NSAttributeString.h"
@implementation RegisterSingleTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}


-(void)setTitleName:(NSString *)TitleName
{
    _TitleName=TitleName;
    
   self.Rtitle.attributedText= [self.Rtitle MarkWithStr:TitleName];
    
    if(self.isInputScore)
    {
        self.Rtitle.frame = CGRectMake(-10, self.Rtitle.frame.origin.y, CGRectGetWidth(self.Rtitle.frame), CGRectGetHeight(self.Rtitle.frame));
        self.Rtitle.textColor = [UIColor blackColor];
        self.RtextFile.textColor = RGBCOLOR(18, 106, 255);
    }

}

-(void)setVaildType:(NSString *)VaildType
{
    _VaildType=VaildType;
    
    if ([VaildType isEqualToString:@"tel"]) {
        
        self.RtextFile.keyboardType=UIKeyboardTypePhonePad;
        
    }else if ([VaildType isEqualToString:@"num"])
    {
        self.RtextFile.keyboardType=UIKeyboardTypeDecimalPad;
        
    }else if ([VaildType isEqualToString:@"url"])
    {
         self.RtextFile.keyboardType=UIKeyboardTypeURL;
        
    }else if ([VaildType isEqualToString:@"email"])
    {
        self.RtextFile.keyboardType=UIKeyboardTypeEmailAddress;
        
    }else if ([VaildType isEqualToString:@"phone"]||[VaildType isEqualToString:@"idCard"])
    {
        self.RtextFile.keyboardType=UIKeyboardTypeASCIICapable;
        
    }else{
        
        self.RtextFile.keyboardType=UIKeyboardTypeDefault;
     
    }

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
